﻿@using RiverCruise.Models.Company
@model RiverCruise.Models.Company.CompanyHistoryModel
<div id="pagerTarget">

    @if (Model.Ships.Any())
    {
        @Html.Partial("_Paging", Model)

        <div>
            @foreach (var ship in Model.Ships)
            {
                <hr />
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-md-1">
                            <h4>
                                <span class="@(ship.HistoryType == HistoryType.In ? "glyphicon glyphicon-chevron-down text-success" : "glyphicon glyphicon-chevron-up text-danger")"></span>
                            </h4>
                        </div>
                        <div class="col-md-9"><h4>@Html.ActionLink(ship.ShipName, "Detail", "Home", new {Id = ship.ShipId}, null)</h4>
                        </div>
                        <div class="col-md-2">@Html.DisplayFor(model => ship.Date)</div>
                    </div>
                </div>
            }
        </div>

        @Html.Partial("_Paging", Model)
    }
    else
    {
        <div class="row">
            <div class="col-md-8 col-md-offset-2">
                <div class="bs-callout bs-callout-warning text-warning">
                    <ul>
                        <li>No history available</li>
                    </ul>
                </div>
            </div>
        </div>
    }
</div>
